<?php
/**
 * Created by PhpStorm.
 * User: zhangrongxiang
 * Date: 2018/2/3
 * Time: 下午3:47
 */

$str = "PHP is the best language on the world!";
echo mb_stripos( $str, "php" ) . PHP_EOL; //0
echo mb_stripos( $str, "Best" ) . PHP_EOL; //11

// !== 严格比较
if ( mb_stripos( $str, "Php" ) !== false ) {
	echo "exists" . PHP_EOL;
	//php is the best language on the world!
	echo mb_strtolower( $str ) . PHP_EOL;
}

echo mb_stripos( $str, "THE", 10 ) . PHP_EOL;//28